<template>
  <view class="content">
      <view class="content-header">
      <!-- <image src="goods.prizeAvatar" mode=""></image> -->
      <image src="https://small.qaqavr.com/img/zhongrui/bg.png" mode=""></image>
      
      <view class="maney">
        12000
      </view>
      <view class="btn">
        <view style="width: 40rpx; height: 40rpx;">
          <image src="https://small.qaqavr.com/img/zhongrui/maney.png" style="width: 100%; height: 100%;" mode=""></image>
        </view> 累计奖励(元)
      </view>
    </view>
    
    <view class="content-box">
      <view class="baoming" v-for="(item,index) in list" :key="index">
        <view style="width: 100%; height: 50rpx;  display: flex;justify-content: space-between; align-items: center;">
          <view style="display: flex;justify-content: space-between; align-items: center;">
            <view style="width: 50rpx ; height: 50rpx; margin-right: 10rpx;">
              <image src="https://small.qaqavr.com/img/zhongrui/niubi.png" style="width: 100%; height: 100%;" mode=""></image>
            </view>
            <view style="font-size: 32rpx; font-weight: 600;">{{item.job.jobName}}</view>
          </view>
          
          <view style="font-size: 30rpx ; font-weight: 600; color: #666666 ;">
          {{item.signUpStatus== 1 ?'待面试' : item.signUpStatus == 2 ? '拒绝' : item.signUpStatus == 3 ? '未处理' :  item.signUpStatus == 4 ? '不符合条件': item.signUpStatus == 5 ? '已入职' : '面试未通过'}}
          </view>
        </view>
        
        
        <view style="width: 100%; height: 150rpx; background-color: #f7f7f7; margin-top: 20rpx; box-sizing: border-box; padding: 5rpx 50rpx;font-size: 24rpx; color: #666666; display: flex; flex-direction: column; justify-content: space-around;">
          
          <view>被推荐人: {{item.job.jobNum}}</view>
          <view>推荐时间:  {{item.createTime.substr(0,item.createTime.length-8)}}</view>
          <view>职位代号:  {{item.jobType.keyWord + item.jobNum}}</view>
          <view>预计奖金: {{item.forecastBonus}}</view>
        </view>
      </view>
    </view>

  </view>
</template>

<script>
  export default {
    data() {
      return {
        list: [],
        getData: {
          openId: uni.getStorageSync('openid'),
          pageIndex: 1,
          pageSize: 20
        },
        status: 'loadmore',
        loadingText: '加载中',
        loadmoreText: '上拉加载',
        nomoreText: '暂无更多'
      };
    },
    onLoad() {
      this.getlist()
    },
    onReachBottom() {
      console.log(123)
      this.getData.pageSize = this.getData.pageSize + 10
      this.status = 'loading'
      this.getlist()
      //this.status = 'nomore'

    },
    methods: {
      async getlist() {
        const {
          data
        } = await uni.$http.post('/sign/findRecommendedPage', this.getData)
        if (data.statusCode !== 200) {
          return
        } else {
          this.list = data.data.data
          
          if(this.list.length === data.data.total) {
            this.status = 'nomore'
          }

        }
      }
    }
  }
</script>

<style lang="scss" scoped>
  .content {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #f7f7f7;
    
    .content-header {
      position: relative;
       height: 300rpx;
       background-color: #f7f7f7;
       image {
         width: 100%;
         height: 100%;
       }
       
       .maney{
         position: absolute;
         top: 30rpx;
         left: 50%;
         transform: translateX(-50%);
         font-size: 100rpx;
         // font-weight: bold;
         color: #FFFFFF;
         font-weight: bold;
         font-style: italic;
         font-family: SimHei;
       }
       .btn{
         width: 320rpx;
         height: 60rpx;
         background-color: #fff;
         border-radius: 30rpx;
         position: absolute;
         top: 150rpx;
         display: flex;
         align-items: center;
         justify-content: space-around;
         left: 50%;
         box-sizing: border-box;
         transform: translateX(-50%);
         padding: 0 30rpx;
         color: #F5A70E;
         font-size: 34rpx;
         font-family: SimHei;
         font-weight: bold;
       }
     }
     
     .content-box{
       position: absolute;
       top: 230rpx;
       left: 50%;
       transform: translateX(-50%);
       width: 80%;
       height: 800rpx;
       .baoming{
         width: 100%;
         height: 250rpx;
         margin-top: 10rpx;
         box-sizing: border-box;
         padding: 10rpx 30rpx;
         background-color: #fff;
         border-radius: 15rpx;
         box-shadow: 0 0 5rpx #ccc;
       }
       
      }



  }
</style>
